using System;
using System.Data;
using System.Collections.Generic;
using System.Collections;
using log4net;
using WEB.BLL.Entities;
using WEB.Exceptions;
namespace WEB.BLL.Services
{
	#region ExpertiseCVService

	/// <summary>
	/// DesktopService object for Ibatis mapped table 'Desktop'.
	/// </summary>
	public class ExpertiseCVService : IExpertiseCVService
	{
		private static readonly ILog log = LogManager.GetLogger(typeof(ExpertiseCVService).Name);
	  	private static volatile ExpertiseCVService _ExpertiseCVService = null;
        public static ExpertiseCVService GetInstance()
        {
            if (_ExpertiseCVService == null)
            {
                lock (typeof( ExpertiseCVService))
                {
                    if (_ExpertiseCVService == null) // double-check
                        _ExpertiseCVService = new ExpertiseCVService();
                }
            }
            return _ExpertiseCVService;
        }
		public ExpertiseCVService()
        {
            //
            // TODO: Add constructor logic here
            //
        }
        public IList<ExpertiseCVEntity> LoadByStudentId(ExpertiseCVEntity objE)
        {
            try
            {
                return ExecuteQueryForList<ExpertiseCVEntity>("ExpertiseCVLoadByStudentId", objE);
            }
            catch (Exception ex)
            {
                log.Debug(ex.Message);
                throw new DBException(ex.Message, ex);
            }
        }
        public int InsertEX(ExpertiseCVEntity objE)
        {
            try
            {
                ExecuteInsert("ExpertiseCVInsertEX", objE);
                return 1;
            }
            catch (Exception ex)
            {
                log.Debug(ex.Message);
                throw new DBException(ex.Message, ex);
            }
        }
        public int DeleteByStudentId(ExpertiseCVEntity objE)
        {
            try
            {
                ExecuteDelete("ExpertiseCVDeleteByStudentId", objE);
                return 1;
            }
            catch (Exception ex)
            {
                log.Debug(ex.Message);
                throw new DBException(ex.Message, ex);
            }
        }
    }
    #endregion
}
